from google.appengine.ext import db

class DSQueue(db.Model):
    name = db.StringProperty()
    queue_cqid = db.StringProperty()
    status = db.IntegerProperty()
    place = db.IntegerProperty()
    creation_date = db.DateTimeProperty(auto_now_add=True)
    type = db.IntegerProperty(default=0)
    avg_time_sec = db.IntegerProperty(default=0)
    image = db.BlobProperty()
    
class DSPosition(db.Model):
    pos_cqid =  db.StringProperty()
    user_ref = db.ReferenceProperty()
    status = db.IntegerProperty()
    ext = db.StringProperty()
    join_time = db.DateTimeProperty(auto_now_add=True)
    processed_time = db.DateTimeProperty()
    
class DSAdmin(db.Model):
    google_id = db.StringProperty()
    email = db.EmailProperty()
      
class DSUser(db.Model):
    user_cqid = db.StringProperty()
    name = db.StringProperty()
    phone = db.StringProperty()
    join_date = db.DateTimeProperty(auto_now_add=True)